+Wed Jan 13 22:34:29 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkbutton.c gtk/gtkclist.c gtk/gtkhandlebox.c
+ gtk/gtkframe.c gtk/gtk[hv]box.c gtk[hv]paned.c gtk/gtklist.c
+ gtkmenu.c gtkmenuitem.c gtkmenubar.c gtknotebook.c
+ gtk/gtkscrolledwindow.c gtk/gtktable.c gtk/gtktree.c
+ gtk/gtktreeeitem.c gtk/gtkviewport.c
+
+ Fix up comparisons of signed and unsigned ints to avoid
+ assigning negative widths/heigths.
+
Wed Jan 13 21:18:41 1999 Owen Taylor <otaylor@redhat.com>
* acinclude.m4 (ac_result): Unset CATOBJEXT so
+Wed Jan 13 22:34:29 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkbutton.c gtk/gtkclist.c gtk/gtkhandlebox.c
+ gtk/gtkframe.c gtk/gtk[hv]box.c gtk[hv]paned.c gtk/gtklist.c
+ gtkmenu.c gtkmenuitem.c gtkmenubar.c gtknotebook.c
+ gtk/gtkscrolledwindow.c gtk/gtktable.c gtk/gtktree.c
+ gtk/gtktreeeitem.c gtk/gtkviewport.c
+
+ Fix up comparisons of signed and unsigned ints to avoid
+ assigning negative widths/heigths.
+
Wed Jan 13 21:18:41 1999 Owen Taylor <otaylor@redhat.com>
* acinclude.m4 (ac_result): Unset CATOBJEXT so
+Wed Jan 13 22:34:29 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkbutton.c gtk/gtkclist.c gtk/gtkhandlebox.c
+ gtk/gtkframe.c gtk/gtk[hv]box.c gtk[hv]paned.c gtk/gtklist.c
+ gtkmenu.c gtkmenuitem.c gtkmenubar.c gtknotebook.c
+ gtk/gtkscrolledwindow.c gtk/gtktable.c gtk/gtktree.c
+ gtk/gtktreeeitem.c gtk/gtkviewport.c
+
+ Fix up comparisons of signed and unsigned ints to avoid
+ assigning negative widths/heigths.
+
Wed Jan 13 21:18:41 1999 Owen Taylor <otaylor@redhat.com>
* acinclude.m4 (ac_result): Unset CATOBJEXT so
+Wed Jan 13 22:34:29 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkbutton.c gtk/gtkclist.c gtk/gtkhandlebox.c
+ gtk/gtkframe.c gtk/gtk[hv]box.c gtk[hv]paned.c gtk/gtklist.c
+ gtkmenu.c gtkmenuitem.c gtkmenubar.c gtknotebook.c
+ gtk/gtkscrolledwindow.c gtk/gtktable.c gtk/gtktree.c
+ gtk/gtktreeeitem.c gtk/gtkviewport.c
+
+ Fix up comparisons of signed and unsigned ints to avoid
+ assigning negative widths/heigths.
+
Wed Jan 13 21:18:41 1999 Owen Taylor <otaylor@redhat.com>
* acinclude.m4 (ac_result): Unset CATOBJEXT so
+Wed Jan 13 22:34:29 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkbutton.c gtk/gtkclist.c gtk/gtkhandlebox.c
+ gtk/gtkframe.c gtk/gtk[hv]box.c gtk[hv]paned.c gtk/gtklist.c
+ gtkmenu.c gtkmenuitem.c gtkmenubar.c gtknotebook.c
+ gtk/gtkscrolledwindow.c gtk/gtktable.c gtk/gtktree.c
+ gtk/gtktreeeitem.c gtk/gtkviewport.c
+
+ Fix up comparisons of signed and unsigned ints to avoid
+ assigning negative widths/heigths.
+
Wed Jan 13 21:18:41 1999 Owen Taylor <otaylor@redhat.com>
* acinclude.m4 (ac_result): Unset CATOBJEXT so
+Wed Jan 13 22:34:29 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkbutton.c gtk/gtkclist.c gtk/gtkhandlebox.c
+ gtk/gtkframe.c gtk/gtk[hv]box.c gtk[hv]paned.c gtk/gtklist.c
+ gtkmenu.c gtkmenuitem.c gtkmenubar.c gtknotebook.c
+ gtk/gtkscrolledwindow.c gtk/gtktable.c gtk/gtktree.c
+ gtk/gtktreeeitem.c gtk/gtkviewport.c
+
+ Fix up comparisons of signed and unsigned ints to avoid
+ assigning negative widths/heigths.
+
Wed Jan 13 21:18:41 1999 Owen Taylor <otaylor@redhat.com>
* acinclude.m4 (ac_result): Unset CATOBJEXT so
+Wed Jan 13 22:34:29 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkbutton.c gtk/gtkclist.c gtk/gtkhandlebox.c
+ gtk/gtkframe.c gtk/gtk[hv]box.c gtk[hv]paned.c gtk/gtklist.c
+ gtkmenu.c gtkmenuitem.c gtkmenubar.c gtknotebook.c
+ gtk/gtkscrolledwindow.c gtk/gtktable.c gtk/gtktree.c
+ gtk/gtktreeeitem.c gtk/gtkviewport.c
+
+ Fix up comparisons of signed and unsigned ints to avoid
+ assigning negative widths/heigths.
+
Wed Jan 13 21:18:41 1999 Owen Taylor <otaylor@redhat.com>
* acinclude.m4 (ac_result): Unset CATOBJEXT so
child_allocation.x = (CHILD_SPACING + GTK_WIDGET (widget)->style->klass->xthickness);
child_allocation.y = (CHILD_SPACING + GTK_WIDGET (widget)->style->klass->ythickness);
- child_allocation.width = MAX (1, widget->allocation.width - child_allocation.x * 2 -
+ child_allocation.width = MAX (1, (gint)widget->allocation.width - child_allocation.x * 2 -
border_width * 2);
- child_allocation.height = MAX (1, widget->allocation.height - child_allocation.y * 2 -
+ child_allocation.height = MAX (1, (gint)widget->allocation.height - child_allocation.y * 2 -
border_width * 2);
if (GTK_WIDGET_CAN_DEFAULT (button))
DEFAULT_LEFT_POS);
child_allocation.y += (GTK_WIDGET (widget)->style->klass->ythickness +
DEFAULT_TOP_POS);
- child_allocation.width = MAX (1, child_allocation.width -
- (GTK_WIDGET (widget)->style->klass->xthickness * 2 + DEFAULT_SPACING));
- child_allocation.height = MAX (1, child_allocation.height -
- (GTK_WIDGET (widget)->style->klass->xthickness * 2 + DEFAULT_SPACING));
+ child_allocation.width = MAX (1, (gint)child_allocation.width -
+ (gint)(GTK_WIDGET (widget)->style->klass->xthickness * 2 + DEFAULT_SPACING));
+ child_allocation.height = MAX (1, (gint)child_allocation.height -
+ (gint)(GTK_WIDGET (widget)->style->klass->xthickness * 2 + DEFAULT_SPACING));
}
gtk_widget_size_allocate (GTK_BIN (button)->child, &child_allocation);
* border width */
clist->internal_allocation.x = 0;
clist->internal_allocation.y = 0;
- clist->internal_allocation.width = MAX (1, allocation->width -
+ clist->internal_allocation.width = MAX (1, (gint)allocation->width -
border_width * 2);
- clist->internal_allocation.height = MAX (1, allocation->height -
+ clist->internal_allocation.height = MAX (1, (gint)allocation->height -
border_width * 2);
/* allocate clist window assuming no scrollbars */
clist_allocation.y = (clist->internal_allocation.y +
widget->style->klass->ythickness +
clist->column_title_area.height);
- clist_allocation.width = MAX (1, clist->internal_allocation.width -
- (2 * widget->style->klass->xthickness));
- clist_allocation.height = MAX (1, clist->internal_allocation.height -
- (2 * widget->style->klass->ythickness) -
- clist->column_title_area.height);
+ clist_allocation.width = MAX (1, (gint)clist->internal_allocation.width -
+ (2 * (gint)widget->style->klass->xthickness));
+ clist_allocation.height = MAX (1, (gint)clist->internal_allocation.height -
+ (2 * (gint)widget->style->klass->ythickness) -
+ (gint)clist->column_title_area.height);
clist->clist_window_width = clist_allocation.width;
clist->clist_window_height = clist_allocation.height;
{
child_allocation.x = (GTK_CONTAINER (frame)->border_width +
GTK_WIDGET (frame)->style->klass->xthickness);
- child_allocation.width = MAX(0, allocation->width - child_allocation.x * 2);
+ child_allocation.width = MAX(1, (gint)allocation->width - child_allocation.x * 2);
child_allocation.y = (GTK_CONTAINER (frame)->border_width +
MAX (frame->label_height, GTK_WIDGET (frame)->style->klass->ythickness));
- child_allocation.height = MAX (1, (allocation->height - child_allocation.y -
- GTK_CONTAINER (frame)->border_width -
- GTK_WIDGET (frame)->style->klass->ythickness));
+ child_allocation.height = MAX (1, ((gint)allocation->height - child_allocation.y -
+ (gint)GTK_CONTAINER (frame)->border_width -
+ (gint)GTK_WIDGET (frame)->style->klass->ythickness));
child_allocation.x += allocation->x;
child_allocation.y += allocation->y;
}
else
{
- child_allocation.width = MAX (1, widget->allocation.width - 2 * border_width);
- child_allocation.height = MAX (1, widget->allocation.height - 2 * border_width);
+ child_allocation.width = MAX (1, (gint)widget->allocation.width - 2 * border_width);
+ child_allocation.height = MAX (1, (gint)widget->allocation.height - 2 * border_width);
if (hb->handle_position == GTK_POS_LEFT ||
hb->handle_position == GTK_POS_RIGHT)
x = allocation->x + GTK_CONTAINER (box)->border_width;
child_allocation.y = allocation->y + GTK_CONTAINER (box)->border_width;
- child_allocation.height = MAX (1, allocation->height - GTK_CONTAINER (box)->border_width * 2);
+ child_allocation.height = MAX (1, (gint)allocation->height - (gint)GTK_CONTAINER (box)->border_width * 2);
children = box->children;
while (children)
if (child->fill)
{
- child_allocation.width = MAX (1, child_width - child->padding * 2);
+ child_allocation.width = MAX (1, (gint)child_width - (gint)child->padding * 2);
child_allocation.x = x + child->padding;
}
else
if (child->fill)
{
- child_allocation.width = MAX (1, child_width - child->padding * 2);
+ child_allocation.width = MAX (1, (gint)child_width - (gint)child->padding * 2);
child_allocation.x = x + child->padding - child_width;
}
else
paned->groove_rectangle.height);
}
- child1_allocation.height = child2_allocation.height = MAX (1, allocation->height - border_width * 2);
+ child1_allocation.height = child2_allocation.height = MAX (1, (gint)allocation->height - border_width * 2);
child1_allocation.width = paned->child1_size;
child1_allocation.x = border_width;
child1_allocation.y = child2_allocation.y = border_width;
paned->groove_rectangle.height = allocation->height;
child2_allocation.x = paned->groove_rectangle.x + paned->gutter_size / 2 + 1;
- child2_allocation.width = MAX (1, allocation->width
+ child2_allocation.width = MAX (1, (gint)allocation->width
- child2_allocation.x - border_width);
/* Now allocate the childen, making sure, when resizing not to
{
child_allocation.x = GTK_CONTAINER (list)->border_width;
child_allocation.y = GTK_CONTAINER (list)->border_width;
- child_allocation.width = MAX (1, allocation->width -
+ child_allocation.width = MAX (1, (gint)allocation->width -
child_allocation.x * 2);
children = list->children;
widget->style->klass->xthickness);
child_allocation.y = (GTK_CONTAINER (menu)->border_width +
widget->style->klass->ythickness);
- child_allocation.width = MAX (1, allocation->width - child_allocation.x * 2);
+ child_allocation.width = MAX (1, (gint)allocation->width - child_allocation.x * 2);
children = menu_shell->children;
while (children)
child_allocation.y = (GTK_CONTAINER (menu_bar)->border_width +
widget->style->klass->ythickness +
BORDER_SPACING);
- child_allocation.height = MAX (1, allocation->height - child_allocation.y * 2);
+ child_allocation.height = MAX (1, (gint)allocation->height - child_allocation.y * 2);
children = menu_shell->children;
while (children)
BORDER_SPACING);
child_allocation.y = (GTK_CONTAINER (widget)->border_width +
widget->style->klass->ythickness);
- child_allocation.width = MAX (1, allocation->width - child_allocation.x * 2);
- child_allocation.height = MAX (1, allocation->height - child_allocation.y * 2);
+ child_allocation.width = MAX (1, (gint)allocation->width - child_allocation.x * 2);
+ child_allocation.height = MAX (1, (gint)allocation->height - child_allocation.y * 2);
child_allocation.x += GTK_MENU_ITEM (widget)->toggle_size;
child_allocation.width -= GTK_MENU_ITEM (widget)->toggle_size;
if (menu_item->submenu && menu_item->show_submenu_indicator)
{
child_allocation.x = GTK_CONTAINER (widget)->border_width;
child_allocation.y = GTK_CONTAINER (widget)->border_width;
- child_allocation.width = MAX (1, allocation->width - child_allocation.x * 2);
- child_allocation.height = MAX (1, allocation->height - child_allocation.y * 2);
+ child_allocation.width = MAX (1, (gint)allocation->width - child_allocation.x * 2);
+ child_allocation.height = MAX (1, (gint)allocation->height - child_allocation.y * 2);
if (notebook->show_tabs || notebook->show_border)
{
child_allocation.x += widget->style->klass->xthickness;
child_allocation.y += widget->style->klass->ythickness;
- child_allocation.width = MAX (1, child_allocation.width -
- widget->style->klass->xthickness * 2);
- child_allocation.height = MAX (1, child_allocation.height -
- widget->style->klass->ythickness * 2);
+ child_allocation.width = MAX (1, (gint)child_allocation.width -
+ (gint) widget->style->klass->xthickness * 2);
+ child_allocation.height = MAX (1, (gint)child_allocation.height -
+ (gint) widget->style->klass->ythickness * 2);
if (notebook->show_tabs && notebook->children && notebook->cur_page)
{
child_allocation.y += notebook->cur_page->requisition.height;
case GTK_POS_BOTTOM:
child_allocation.height =
- MAX (1, child_allocation.height -
- notebook->cur_page->requisition.height);
+ MAX (1, (gint)child_allocation.height -
+ (gint)notebook->cur_page->requisition.height);
break;
case GTK_POS_LEFT:
child_allocation.x += notebook->cur_page->requisition.width;
case GTK_POS_RIGHT:
child_allocation.width =
- MAX (1, child_allocation.width -
- notebook->cur_page->requisition.width);
+ MAX (1, (gint)child_allocation.width -
+ (gint)notebook->cur_page->requisition.width);
break;
}
}
allocation->x = GTK_CONTAINER (widget)->border_width;
allocation->y = GTK_CONTAINER (widget)->border_width;
- allocation->width = MAX (1, widget->allocation.width - allocation->x * 2);
- allocation->height = MAX (1, widget->allocation.height - allocation->y * 2);
+ allocation->width = MAX (1, (gint)widget->allocation.width - allocation->x * 2);
+ allocation->height = MAX (1, (gint)widget->allocation.height - allocation->y * 2);
if (scrolled_window->vscrollbar_visible)
{
allocation->x += (scrolled_window->vscrollbar->requisition.width +
SCROLLBAR_SPACING (scrolled_window));
- allocation->width = MAX (1, allocation->width -
- (scrolled_window->vscrollbar->requisition.width +
- SCROLLBAR_SPACING (scrolled_window)));
+ allocation->width = MAX (1, (gint)allocation->width -
+ ((gint)scrolled_window->vscrollbar->requisition.width +
+ (gint)SCROLLBAR_SPACING (scrolled_window)));
}
if (scrolled_window->hscrollbar_visible)
{
allocation->y += (scrolled_window->hscrollbar->requisition.height +
SCROLLBAR_SPACING (scrolled_window));
- allocation->height = MAX (1, allocation->height -
- (scrolled_window->hscrollbar->requisition.height +
- SCROLLBAR_SPACING (scrolled_window)));
+ allocation->height = MAX (1, (gint)allocation->height -
+ ((gint)scrolled_window->hscrollbar->requisition.height +
+ (gint)SCROLLBAR_SPACING (scrolled_window)));
}
}
if (table->cols[col].shrink)
{
extra = width / nshrink;
- table->cols[col].allocation = MAX (1, table->cols[col].allocation - extra);
+ table->cols[col].allocation = MAX (1, (gint)table->cols[col].allocation - extra);
width -= extra;
nshrink -= 1;
if (table->rows[row].shrink)
{
extra = height / nshrink;
- table->rows[row].allocation = MAX (1, table->rows[row].allocation - extra);
+ table->rows[row].allocation = MAX (1, (gint)table->rows[row].allocation - extra);
height -= extra;
nshrink -= 1;
if (child->xfill)
{
- allocation.width = MAX (1, max_width - child->xpadding * 2);
+ allocation.width = MAX (1, max_width - (gint)child->xpadding * 2);
allocation.x = x + (max_width - allocation.width) / 2;
}
else
if (child->yfill)
{
- allocation.height = MAX (1, max_height - child->ypadding * 2);
+ allocation.height = MAX (1, max_height - (gint)child->ypadding * 2);
allocation.y = y + (max_height - allocation.height) / 2;
}
else
{
child_allocation.x = GTK_CONTAINER (tree)->border_width;
child_allocation.y = GTK_CONTAINER (tree)->border_width;
- child_allocation.width = MAX (1, allocation->width - child_allocation.x * 2);
+ child_allocation.width = MAX (1, (gint)allocation->width - child_allocation.x * 2);
children = tree->children;
gtk_widget_size_allocate (item->pixmaps_box, &child_allocation);
child_allocation.y = GTK_CONTAINER (widget)->border_width;
- child_allocation.height = MAX (1, allocation->height - child_allocation.y * 2);
+ child_allocation.height = MAX (1, (gint)allocation->height - child_allocation.y * 2);
child_allocation.x += item->pixmaps_box->requisition.width+DEFAULT_DELTA;
child_allocation.width =
- MAX (1, allocation->width - (child_allocation.x + border_width));
+ MAX (1, (gint)allocation->width - ((gint)child_allocation.x + border_width));
gtk_widget_size_allocate (bin->child, &child_allocation);
}
y = allocation->y + GTK_CONTAINER (box)->border_width;
child_allocation.x = allocation->x + GTK_CONTAINER (box)->border_width;
- child_allocation.width = MAX (1, allocation->width - GTK_CONTAINER (box)->border_width * 2);
+ child_allocation.width = MAX (1, (gint)allocation->width - (gint)GTK_CONTAINER (box)->border_width * 2);
children = box->children;
while (children)
if (child->fill)
{
- child_allocation.height = MAX (1, child_height - child->padding * 2);
+ child_allocation.height = MAX (1, child_height - (gint)child->padding * 2);
child_allocation.y = y + child->padding;
}
else
if (child->fill)
{
- child_allocation.height = MAX (1, child_height - child->padding * 2);
+ child_allocation.height = MAX (1, child_height - (gint)child->padding * 2);
child_allocation.y = y + child->padding - child_height;
}
else
attributes.y = 0;
}
- attributes.width = MAX (1, widget->allocation.width - attributes.x * 2 - border_width * 2);
- attributes.height = MAX (1, widget->allocation.height - attributes.y * 2 - border_width * 2);
+ attributes.width = MAX (1, (gint)widget->allocation.width - attributes.x * 2 - border_width * 2);
+ attributes.height = MAX (1, (gint)widget->allocation.height - attributes.y * 2 - border_width * 2);
attributes.event_mask = 0;
viewport->view_window = gdk_window_new (widget->window, &attributes, attributes_mask);
paned->groove_rectangle.height);
}
- child1_allocation.width = child2_allocation.width = MAX (1, allocation->width - border_width * 2);
+ child1_allocation.width = child2_allocation.width = MAX (1, (gint)allocation->width - border_width * 2);
child1_allocation.height = paned->child1_size;
child1_allocation.x = child2_allocation.x = border_width;
child1_allocation.y = border_width;
paned->groove_rectangle.width = allocation->width;
child2_allocation.y = paned->groove_rectangle.y + paned->gutter_size / 2 + 1;
- child2_allocation.height = MAX (1, allocation->height
+ child2_allocation.height = MAX (1, (gint)allocation->height
- child2_allocation.y - border_width);
/* Now allocate the childen, making sure, when resizing not to